ˈjuːli̯aːn mɑːk's profile

WörterBot – A Twitter bot



A Twitter bot that randomly combines German words and posts them online once a day. 

How it works: The bot was written in Python and currently uses a collection of about 4000 adjectives, 3200 verbs, over 400,000 nouns and 600 nouns in the plural. It is programmed to select one of the eight word combinations (adjective + noun in plural, noun in plural + verb, etc.), then pick one random word in each of the lists and post the final result on Twitter afterwards. 

----

Ein Twitter bot, der per Zufallsprinzip Wörter der deutschen Sprache aneinanderreiht und sie täglich online postet. ​​​​​​​

Wie er funktioniert: Der bot ist in der Programmiersprache Python geschrieben und er bedient sich aktuell aus einer Sammlung von etwa 4000 Adjektiven, 3200 Verben, 400.000+ Substantiven und knapp 600 Substantiven im Plural. Der bot ist darauf programmiert, vor jedem Post unter einer der acht Wortkombinationen (Adjektiv + Substantiv im Plural, Substantiv im Plural + Verb, etc.) auszuwählen, sich in den entsprechenden Listen per Zufallsprinzip jeweils ein Wort herauszusuchen, um sie dann am Ende zusammengeführt auf Twitter zu posten. 
In order for the word combinations to be posted on the right account, it is necessary to register the bot on the official Twitter developer platform. Individual access keys will be generated there, which must be included in the Python script. The connection between the script and the Twitter account works through a module called Tweepy, which has to be added as an extension to the Python app. Tweepy ultimately communicates the output of the executed script to Twitter's servers and ultimately posts them there, scheduled. ​​​​​​​

----

Damit die Posts auf dem richtigen Account landen, muss man seinen bot vorher auf der Entwicklerseite von Twitter anmelden. Dort erhält man nach der Registrierung die entsprechenden Zugangscodes, die man in sein Skript einbaut. Die Verbindung zwischen dem Skript und meinem Twitteraccount funktioniert über ein Modul namens Tweepy, welches man als Erweiterung zur Python App hinzufügen muss. Dieses kommuniziert die Ausgaben des ausgeführten Skripts letztendlich jedesmal zu den Servern von Twitter und stellt diese getimed als Post online. 
The first image shows parts of the script. At the bottom you can see the functions that are responsible for the different word combination-outputs. In the second image you see a small part of the file, in which the 400,000 nouns are listed. The bot can now be found here.

----

Das erste Bild zeigt einen Ausschnitt des Skripts. Im unteren Teil stehen die Funktionen, die die verschiedenen Wortkombinationen beschreiben. Im zweiten Bild sieht man einen kleinen Teil der Datei, in der die über 400.000 Substantive gelistet sind. Der Account ist hier zu finden.

WörterBot – A Twitter bot
Published:

Owner

WörterBot – A Twitter bot

Twitter bot that randomly combines German words and posts them online once a day.

Published: